package com.sc1905.crane.reading.service.impl;

import com.sc1905.crane.mapper.NNovelMapper;
import com.sc1905.crane.pojo.NNovel;
import com.sc1905.crane.reading.service.NovelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NovelServiceImpl implements NovelService {



    @Resource
    NNovelMapper novelMapper;

    @Override
    public NNovel novelDetails(Integer novelId) {
        return novelMapper.selectByPrimaryKey(novelId);
    }

    @Override
    public String novelType(Integer typeId) {
        return novelMapper.novelType(typeId);
    }

    @Override
    public List<NNovel> otherWorks(Integer userId,Integer novelId) {
        return novelMapper.otherWorks(userId,novelId);
    }
}
